Skip to content

Fix vector search index creation failing with BadValue on Atlas Local#16

Merged
Ekman merged 1 commit into
Ekman:mainfrom
henrik645:fix/vector-search-index-creation
Jun 11, 2026
Merged

Fix vector search index creation failing with BadValue on Atlas Local#16
Ekman merged 1 commit into
Ekman:mainfrom
henrik645:fix/vector-search-index-creation

Conversation

@henrik645

Copy link
Copy Markdown
Contributor

When updateSearchIndex is called for a new vector search index (fields-based, no mappings), Atlas Local validates the definition before checking existence and returns BadValue ("mappings is required") instead of IndexNotFound. This prevented the createSearchIndex fallback from ever being triggered.

Fix by also catching BadValue for vectorSearch-type definitions.

When updateSearchIndex is called for a new vector search index (fields-based,
no mappings), Atlas Local validates the definition before checking existence
and returns BadValue ("mappings is required") instead of IndexNotFound. This
prevented the createSearchIndex fallback from ever being triggered.

Fix by also catching BadValue for vectorSearch-type definitions.
@Ekman Ekman merged commit f38b3a7 into Ekman:main Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants